/**
 * 
 */
package com.pine.sunshineelder.exit.web.handler;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.pine.sunshineelder.common.dto.JSONResponse;
import com.pine.sunshineelder.common.entity.RecordExitEntity;
import com.pine.sunshineelder.exit.ao.ExitAo;
import com.pine.sunshineelder.exit.service.ExitService;

/**
 * @author 苟瑞雪
 *
 */
@RestController
@RequestMapping("/api")
public class ExitHandler {
	@Autowired
	ExitService service;
	@PostMapping("/exit")
	public JSONResponse exit(ExitAo ao) throws Exception {
		RecordExitEntity exit = service.exit( ao);
		return JSONResponse.ok(exit);
		
	}
    
}
